package manager.search.controller;
import common.PageView;
import common.ResponseEntity;
import io.swagger.annotations.ApiOperation;
import manager.search.service.SearchService;
import manager.search.vo.SpuConditionEsVO;
import manager.search.vo.SpuEsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping(value = {"/customer/search"})
public class SearchGoodsController {
    @Autowired
    private SearchService searchService;
    @RequestMapping(value = "/goods/page/list", method = RequestMethod.POST)
    @ApiOperation(notes = "分页获取ES规格参数信息", value = "get goods info")
    public ResponseEntity<PageView<List<SpuEsVO>>> selectByConditionPage(@RequestBody SpuConditionEsVO spuConditionEsVO){
          ResponseEntity<PageView<List<SpuEsVO>>> responseEntity=searchService.getGoodsByPageCondition(spuConditionEsVO);
          return responseEntity;
    }

}
